<template>
  <view class="content">
    <view>惠源二手车</view>
    <!--    <uni-calendar :insert="true" :lunar="true" :start-date="'2019-3-2'" :end-date="'2019-5-20'" />-->
  </view>
</template>

<script>
  import api from '@/api';
  import { login } from '../../api';
  export default {
    data() {
      return {
        title: 'Hello',
      };
    },
    async onLoad() {
      await this.login();
      await this.getUserInfo();
    },
    methods: {
      async login() {
        await api.login({ phone: 17608015960, pwd: '123' });
      },
      async getUserInfo() {
        const { code, data } = await api.getUserInfo();
        if (code === 200) {
          console.log('data', data);
        }
      },
    },
  };
</script>

<style>
  .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
</style>
